#pragma once

#include <AVUIDependencyObject.h>

namespace AVUI {

class ControlTemplate;
class Style;
class TriggerBase;

class TriggerAction : public DependencyObject
{
public:
    DECLARE_ELEMENT(TriggerAction, DependencyObject);

    TriggerAction() { }

    virtual void Invoke(FrameworkElement* pFE, FrameworkContentElement* pFCE, Style* pTargetStyle, FrameworkTemplate* pTargetTemplate, int layer) = 0;
    virtual void Invoke(FrameworkElement* pElement) = 0;

    void Seal(TriggerBase* pContainingTrigger)
    {
        if(pContainingTrigger != m_pContainingTrigger)
        {
            CheckSealed();
        }
        DependencyObject::Seal();
    }

    TriggerBase* get_ContainingTrigger() { return m_pContainingTrigger; }

    void CheckSealed() { }
private:

    TriggerBase* m_pContainingTrigger;
};


}; // namespace AVUI
